import request from './request.js'
//首页
const index = data => {
  return request('index', data,'GET')
}

//经纪人
const broker = data => {
  return request('broker/index', data,'GET')
}

//新闻资讯
const news = data => {
  return request('news/index', data,'GET')
}
const newsRead = data => {
  return request('news/read?id='+data.id, data,'GET')
}

//所有城市
const city = data => {
  return request('city', data,'GET')
}
//获取当前城市地址
const cityInfo = data => {
  return request('city/cityInfo', data,'GET')
}

//楼盘列表
const house = data => {
  return request('house/index', data,'GET')
}

//楼盘参数
const houseSelected = data => {
  return request('house/selected', data,'GET')
}
//楼盘详细
const houseRead = data => {
  return request('house/read?id=', data,'GET')
}
const houseNews = data => {
  return request('house/news', data,'GET')
}

//留言数据
const  subscribe= data => {
  return request('api/subscribe', data,'POST')
}

//留言参数
const apiSelected = data => {
  return request('api/selected', data,'GET')
}
module.exports = {
	index,
	city,
	house,
	houseSelected,
	cityInfo,
	houseRead,
	subscribe,
	broker,
	news,
	newsRead,
	apiSelected,
	houseNews
}
